import { CACHE_KEY, useCache } from '#/hooks/web/useCache';

const { wsCache } = useCache();

// ========== 租户相关 ==========

export const getTenantId = () => {
  return wsCache.get(CACHE_KEY.TenantId);
};

export const setTenantId = (tenantId: string) => {
  wsCache.set(CACHE_KEY.TenantId, tenantId);
};

export const getVisitTenantId = () => {
  return wsCache.get(CACHE_KEY.VisitTenantId);
};

export const setVisitTenantId = (visitTenantId: string) => {
  wsCache.set(CACHE_KEY.VisitTenantId, visitTenantId);
};
